import tkinter as tk

root = tk.Tk()
root.config(bg='#8DB6CD')
root.title("YOLO")
root.iconbitmap("qianduan\logo.ico")
root.geometry('400x300')

def func():
  print("您通过弹出菜单执行了命令")


menu = tk.Menu(root,tearoff=False)
menu.add_command(label="新建",command=func)
menu.add_command(label="复制",command=func)
menu.add_command(label="粘贴",command=func)
menu.add_command(label="剪切",command=func)

def command(event):
  menu.post(event.x_root,event.y_root)

root.bind("<Button-3>",command)
root.mainloop()